package com.shqcjd.siemensglass.http;


import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by sy on 2018/5/3.
 */

public class RxHttp<T> {
    public void send(Observable<T> observable, Observer<T> subscription) {
        observable.subscribeOn(Schedulers.newThread()).observeOn(AndroidSchedulers.mainThread()).unsubscribeOn(Schedulers.io()).subscribe(subscription);

    }
}
